package com.xhwy.controller;

import com.xhwy.service.CarouselService;
import com.xhwy.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/carousel")
public class CarouselController {

    @Autowired
    private CarouselService carouselService;

    /**
     * 返回优先级最高的4条轮播图
     * @return
     */
    @GetMapping("getAllByPriority")
    public R getAllByPriority(){

        return carouselService.getAllByPriority();
    }
}
